﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text;

public partial class map : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected string GetZtactiveList(int TypeID, int TopNum, int length)
    {
        string sql = "select top " + TopNum + " * from Whir_U_News where TypeID=" + TypeID + " order by CreateDate desc";
        string mode = "ztactive";

        System.Text.StringBuilder sb = new StringBuilder();
        System.Data.DataTable dt = Whir.SQLServerDAL.DbHelperSQL.Query(sql).Tables[0];
        if (dt != null && dt.Rows.Count > 0)
        {
            foreach (System.Data.DataRow dr in dt.Rows)
            {
                string title = dr["Title"].ToString();
                string id = dr["Whir_U_News_PID"].ToString();
                string _TypeID = dr["TypeID"].ToString();
                sb.AppendFormat("<li><a   href=\"news_info.aspx?id={1}&mode=pxnews&cid={2}\">" + Whir.Common.WebHelper.StringHelper.CutString(dr["Title"].ToString(), length) + "</a></li>", title, id, _TypeID);
            }
        }

        return sb.ToString();
    }
}
